Re: Help in concatenation - modular development

Re: Help in concatenation - modular development

am 07.06.2008 21:15:27 von Yves Sucaet

If you want to go for a modular approach, you should consider switching t=
o a
solution such as Smarty: http://www.smarty.net for more info.

HTH,

Yves

------ Original Message ------
Received: Sat, 07 Jun 2008 11:55:38 AM CDT
From: "Nitsan Bin-Nun"
To: "Nasreen Laghari" Cc: php-db@lists.php.net=

Subject: Re: [PHP-DB] Help in concatenation

1.
" href=3D" print("$thispage".($y>0?("?start=3D").$y:""));?>"> print($pg);?>
2. print("$thispage".($next>0?("?start=3D").$next:""));?>"><<

turns into:


> > $string =3D ' > if ($y > 0) $string .=3D "\$start=3D" . $y;
> $string .=3D '">' . $pg . '
';
> ?>






> > $string2 =3D ' > if ($next > 0) $string2 .=3D '?start=3D' . $next;
> $string2 .=3D '">
';
> ?>

I can squeeze the if operation into the string but I can't see good cause=

for this (this is less spageti this way)
On 06/06/2008, Nasreen Laghari wrote:
>
> Hi,
>
> I need to change PHP embeded in HTML to HTML embeded in PHP as trying t=
o
> use modularity approach.
> I'm stuck on below these lines where concatenation is the big issue. I =
have
> researched, read but couldnt sort this out after try really hard.
> Could any one please help me to change this code to HTML embeded in PHP=

> please. Mostly i'm getting confuse where text is written in red
> I know it is very basic question but this concatenation is confusing me=
so
> much. I have spended my whole day in sorting this out but :(
> 1. " href=3D" > print("$thispage".($y>0?("?start=3D").$y:""));?>"> a>
> 2.
> print("$thispage".($next>0?("?start=3D").$next:""));?>"><<
> Thank you
>
>
>





--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php